<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /* 
        html元素一定要设置100%，100%就是浏览器的高度 */
        html,body {
            height: 100%;
        }
        div {
            /* width: 100%; */
            height: 100%;
            background: red;
        }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>